﻿using System;
using System.Collections.Generic;
using System.Text;

namespace TcpLabCommon
{
    /// <summary>
    /// 序列化接口
    /// </summary>
    public interface ISerialize
    {
        /// <summary>
        /// 序列化
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="stream"></param>
        /// <param name="item"></param>
         byte[] Serialize<T>(T Data);


        /// <summary>
        /// 反序列化
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="stream"></param>
        /// <returns></returns>
         T DeSerialize<T>(byte[] Data);
    }
}
